import Vue from 'vue'
import Router from 'vue-router'
/* 路由懒加载 */
const recommend=()=>import('../components/recommend.vue')
const listSong = () => import('../components/listSong.vue')
const hotSong=()=>import('../components/hotSong.vue')
const search2=()=>import('../components/search2.vue')
const index=()=>import('../components/index.vue')
const play = () => import('../components/play.vue')


Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      redirect: 'recommend',
    },
    {
      path:'/index',
      component: index,
    },
    {
      path: '/recommend',
      name: 'recommend',
      component: recommend,
    },
    {
      path: '/listSong/:id',
      name: 'listSong',
      component: listSong,
    },
    {
      path:'/play/:id',
      name: 'play',
      component:play
    },
    {
      path:'/hotSong',
      name: 'hotSong',
      component:hotSong,
    },
    {
      path:'/search2',
      name: 'search2',
      component:search2
    },
  ]
})
